
import request from '@/utils/request'


/**
 * 获取订单列表
 * @param {*} options {orderName,orderNum,nickName,phone,shopName,type}
 */
export function getOrderList(options){
  
    return request({
      url: '/mg/Orders/GetList',
      method: 'get',
      params: options
    })
}

/**
 * 获取订单详情
 * @param {*} options  {id,orderNum}
 */
export function getOrderInfo(options){
    return request({
      url: 'mg/Orders/GetDetails',
      method: 'get',
      params: options
    })
}



/**
 * 获取退款列表
 * @param {*} options  {orderNum,nickName,phone,shopName,type}
 */
export function getRefundList(options){
    return request({
      url: '/mg/OrderRefund/GetList',
      method: 'get',
      params: options
    })
}

/**
 * 根据订单号获取退款详情
 * @param {*} options {id}
 */
export function getRefundInfo(options){
    return request({
      url: '/mg/OrderRefund/GetDetails',
      method: 'get',
      params: options
    })
}

/**
 * 仲裁处理
 * @param {*} data {id,reason,images}
 */
export function arbitrateRefund(data){
  return request({
    url: '/mg/OrderRefund/ArbitrateRefund',
    method: 'post',
    data
  })
}

/**
 * 根据id获取退款详情
 * @param {object} options {id}
 */
export function getRefundActivitys(options){
  return request({
    url: '/mg/OrderRefund/GetRefundActivitys',
    method: 'get',
    params: options
  })
}

/**
 * 根据id获取退款详情
 * @param {object} options {id}
 */
export function getCredentialForArbitrate(options){
  return request({
    url: '/mg/OrderRefund/GetCredentialForArbitrate',
    method: 'get',
    params: options
  })
}


/**
 * 测试环境付款成功
 * @param {object} options {id}
 */
export function PayOrderTest(options){
  return request({
    url: '/mg/Orders/PayOrderTest',
    method: 'get',
    params: options
  })
}

